#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QWebSocket>
#include "rm_logindialog.h"
#include "rm_mainwindow.h"
#include <QJsonObject>
#include <QDebug>
#include "rm_meetingroom.h"

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    static MainWindow* g_MainWin;
    QWebSocket m_webSocket;
    static QString serverip;
    static QString userphone;
    static QString groomid;
    QStringList Tempuserlist;

    void enterroom(QString roomid);
    void leaveroom();

public slots:
    void onTextMessageReceived(QString message);
protected:
    void resizeEvent(QResizeEvent *event);
private:
    Ui::MainWindow *ui;
    rm_LoginDialog* m_loginDialg;
    rm_MainWindow* m_mainwindow;
    RM_MeetingRoom* m_meetingroom;
};
#endif // MAINWINDOW_H
